{% load ralph_tags i18n staticfiles sitetree admin_list cache %}<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}"{% if LANGUAGE_BIDI %} dir="rtl"{% endif %} class="no-js">
  <head>
    {% if google_tag_manager_tag_id %}
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','{{ google_tag_manager_tag_id }}');</script>
    <!-- End Google Tag Manager -->
    {% endif %}
    <title>{% block title %}{% endblock %}</title>
    {% block extrahead %}{% endblock %}
    {{ media.css }}
    <link rel="stylesheet" type="text/css" href="{% static "vendor/css/foundation-datepicker.css" %}">
    <link rel="stylesheet" type="text/css" href="{% static "css/ralph.css" %}" />
    {% include 'admin/includes/favicon.html' %}
    <script type="text/javascript" src="{% static "admin/js/core.js" %}"></script>
    <script src="{% static "vendor/js/webcomponents-lite.js" %}"></script>
    <link rel="import" href="{% static "elements/elements-min.html" %}">
    {% block scripts %}{% include 'admin/includes/javascripts.html' %}{% endblock %}
  </head>
  <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"{% block body_extra_attrs %}{% endblock %}>
  {% if google_tag_manager_tag_id %}
  <!-- Google Tag Manager (noscript) -->
  <noscript><iframe src="{{"https://www.googletagmanager.com/ns.html?id="|add:google_tag_manager_tag_id}}"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <!-- End Google Tag Manager (noscript) -->
  {% endif %}
    {% if not is_popup %}
      {% block main_nav %}
        <nav class="top-bar" data-topbar>
          <ul class="title-area">
            <li class="name">
              {% block branding %}{{ site_header }}{% endblock %}
            </li>
            <li class="toggle-topbar menu-icon">
              <a href="#"><span>Menu</span></a>
            </li>
          </ul>
          <section class="top-bar-section">
              <!-- user cache key: {{ request.user.permissions_hash }} -->
              {% cache 86400 header_menu opts.app_label opts.model_name request.user.permissions_hash %}
              {% spaceless %}
              <!-- cache -->
                {% sitetree_menu from "ralph_admin" include "trunk" template "admin/menu_admin.html" %}
              {% endspaceless %}
              <!-- end cache -->
              {% endcache %}
            <ul class="right">
              <li class="has-form">
                {% contextual_search_form search_url search_fields model_verbose_name %}
              </li>
              {% block usertools %}
                {% if has_permission %}
                  {% block welcome-msg %}
                    <li class="has-dropdown not-click">
                      <a href="">
                        {% firstof user.get_full_name user.get_username %}
                      </a>
                      <ul class="dropdown">
                        {% block userlinks %}
                          {% include 'admin/partials/userlinks.html' %}
                        {% endblock %}
                      </ul>
                    </li>
                  {% endblock %}
                {% endif %}
              {% endblock %}
              {% block nav-global %}{% endblock %}
            </ul>
          </section>
        </nav>
        {% block breadcrumbs %}
          {% if not original or original.modified %}
            {% cache 86400 breadcrumbs opts.app_label opts.model_name original.modified %}
            <!-- cache -->
              {% spaceless %}
                {% sitetree_breadcrumbs from "ralph_admin" template "admin/breadcrumbs_foundation.html" %}
              {% endspaceless %}
            <!-- end cache -->
            {% endcache %}
          {% else %}
              {% sitetree_breadcrumbs from "ralph_admin" template "admin/breadcrumbs_foundation.html" %}
          {% endif %}
        {% endblock %}
      {% endblock %}
    {% endif %}
    {% if messages %}
      <div class="row">
        <div class="small-12 columns">
          {% for message in messages %}
            <div data-alert class="alert-box radius {{ message.tags }}">
              {{ message }}
              <a href="#" class="close">&times;</a>
            </div>
         {% endfor %}
        </div>
      </div>
    {% endif %}
    <div class="row">
      <div class="large-12 columns content">
        {% block content %}{% endblock %}
      </div>
    </div>
    {% block javascripts %}
      <!-- form media -->
      {{ media.js }}
      <!-- extra media -->
      {% block extra_scripts %}{% endblock %}
      {% block admin_change_form_document_ready %}{% endblock %}
    {% endblock %}
    {% download_attachments %}
  </body>
</html>
